﻿using System;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using O1;
using O1.Data;
using O1.Data.Traversal;

namespace Tests.O1.Behaviors
{
    [TestClass]
    public class BreadthFirstTraversal
    {
        [TestMethod, TestCategory("Unit Test")]
        public void Traverse4LevelsWithMatchingEdgeType()
        {
            Filter[] filters;
            var builder =
                ScenarioBuilder.BuildGraphForOutboundEdgeFilter(1, 12, EdgeDirections.Inbound, 4, 5, 4, out filters);


            var observer = new CellObserver(filters[0]);

            var offset = 0;
            while (offset < builder.Length)
            {
                offset += CellIterator.Iterate(1, builder.GetBuffer(), 0, observer);
            }
        }
    }
}
